package views

import (
	"log"
	"net/http"

	"gitee.com/Yu-eng/Myproject/my-go-blog/common"
	"gitee.com/Yu-eng/Myproject/my-go-blog/config"
	"gitee.com/Yu-eng/Myproject/my-go-blog/service"
)

func (*HTMLApi) Pigeonhole(w http.ResponseWriter, r *http.Request) {
	pigeonhole := common.Template.Pigeonhole

	//查询  在sevice 查询数据 并返回页面
	pigeonholeRes, err := service.FindPostPigeonhole()
	if err != nil {
		log.Println("findPostpigeonhole 错误,", err)
		pigeonhole.WriteError()
	}
	pigeonhole.WriteData(w, config.Cfg.Viewer)
}
